package cn.edu.sjtu.stap.graph;

/**
 * The visitor for traversing the components in a graph.
 * 
 * @author William
 * 
 */
public class GraphVisitor {
    public void endVisit(IGraphComponent n) {
        // do nothing by default.
    }

    public void endVisit(GraphComponent c) {
        // do nothing by default.
    }

    public void endVisit(GraphNode n) {
        // do nothing by default.
    }

    public void endVisit(GraphEdge e) {
        // do nothing by default.
    }

    public boolean visit(IGraphComponent n) {
        return true;
    }

    public boolean visit(GraphComponent c) {
        return true;
    }

    public boolean visit(GraphNode n) {
        return true;
    }

    public boolean visit(GraphEdge e) {
        return true;
    }
}
